<template>
  <j-select-biz-component :width="1200" :name="name" :inputs="false" :queryConfig='queryConfig' :searchIcon='searchIcon' :selectButtonText="selectButtonText"  v-bind="configs" v-on="$listeners"/>
</template>

<script>
import JSelectBizComponent from '@/components/cn-select-popup/JSelectBizComponent'

export default {
  name: 'JSelectActProducts',
  components: { JSelectBizComponent },
  props: {
    value: {
      type: String,
      default: ''
    },
    name: {
      type: String,
      default: '商品'
    },
    selectButtonText:{
      type: String,
      default: '选择'
    },
    inputs:{
      type: Boolean,
      default: true
    },
    searchIcon:{
      type: String,
      default: 'search'
    },
    queryConfig:{
      type:Array,
      default:()=>[]
    }
  },
  data() {
    return {
      settings: {
        displayKey: 'maktx',
        returnKeys: ['id', 'matnr'],
        listUrl:  '/cnProductController/findPageListByAcd',
        ellipsisLength:-1,
        columns: [
          { title: '商品名称', dataIndex: 'maktx', align: 'left', width: '50%', widthRight: '70%' },
          { title: '商品编码', dataIndex: 'matnr', align: 'left', width: '50%' },
        ]
      }
    }
  },
  computed: {
    configs() {
      return Object.assign({ value: this.value }, this.settings, this.$attrs)
    }
  }
}
</script>

<style lang="less" scoped></style>